package com.acwer.drools.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Repository;

import com.acwer.drools.domain.MDC;
import com.acwer.drools.domain.OMDC;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

@Repository
//@CacheConfig(cacheNames="OMdcDao")
//@Cacheable
public interface OMdcDao extends BaseMapper<OMDC>{

	@Select({  "<script>", 
		"select jbbm,mdc,mtype from OMDC omc",
		"WHERE  not exists (select 1 from OMDC mc where omc.mtype=mc.mtype and mc.jbbm=#{zzd})", 
		" AND  jbbm in",
			"<foreach collection='lst' open='(' close=')' item='bm' index='i' separator=','>#{bm}</foreach>",
			
			"</script>" 
		})
	public  List<OMDC> getOMDcList(@Param("lst")List<String> lst,@Param("zzd")String zzd);
	
}
